﻿using System;
using System.Collections.Generic;
using System.Web;
using Huayou.Common;
using HySoft.Cash.Business;
using HySoft.Cash.Structure;
using System.Web.UI;

namespace PayRoller.Code
{
    public class OpeCommon : Page
    {
        public bool AddUptReport(int EmpSid, string pEffectedCode, int OrgSid)
        {
            return AddUptReport(EmpSid,  pEffectedCode,  OrgSid,string.Empty,string.Empty,string.Empty);
        }

        public bool AddUptReport(int EmpSid, string pEffectedCode, int OrgSid,string changedBy)
        {
            return AddUptReport(EmpSid, pEffectedCode, OrgSid, string.Empty, string.Empty, changedBy);
        }

        public bool AddUptReport(int EmpSid, string pEffectedCode, int OrgSid, string changedFrom, string changedTo, string changedBy)
        {
            TuptreportBN tbn = new TuptreportBN(this.Page);
            TuptreportDT detail = new TuptreportDT();
            detail.EmpSid = EmpSid;
            detail.UptDate = DateTime.Now.ToString("dd-MM-yyyy hh:mm:ss");
            detail.EffectedCode = pEffectedCode;
            detail.OrgSid = OrgSid;
            detail.ChangedBy = changedBy;
            detail.ChangedFrom = changedFrom;
            detail.ChangedTo = changedTo;
            bool flag = tbn.Add(detail);
            tbn.Dispose();
            tbn = null;
            return flag;
        }
    }
}
